<!DOCTYPE html>
<html lang="zh">
<head>
	{block name="assign"}{/block}
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="keywords" content="{$meta_keywords|default=$Think.config.web.site_keywords}">
	<meta name="description" content="{$meta_description|default=$Think.config.web.site_description}">
	<title>{block name="meta_title"}{$meta_title|default=''}{/block}</title>
	<link rel="stylesheet" href="//at.alicdn.com/t/font_139584_ss9nvvp1bhhestt9.css"/>
	<link rel="stylesheet" href="__STATIC__/vendor/layui/css/layui.css">
	<link rel="stylesheet" href="__STATIC__/vendor/layui-fly/css/global.css">
	{block name="importCss"}{/block}
	<link rel="stylesheet" href="__CSS__/app.css" __import_css__/>
	{block name="head"}{/block}
</head>
<body class="{$__BODY_CLASS__ | default=''}">

{block name="header"}
{include file="public/header"/}
{/block}

{block name="body-wrapper"}
<div class="layui-container" style="margin-top: 30px">
	<div class="layui-row layui-col-space15">
		{block name="side"}{/block}

		<div class="layui-col-md8">
			{block name="body"}{/block}
		</div>

		{block name="additional"}
		{include file="public/additional"/}
		{/block}
	</div>
</div>
{/block}

{block name="footer"}
{include file="public/footer"/}
{/block}

</body>
<script src="__STATIC__/vendor/layui/layui.all.js"></script>
<script type="text/javascript">
window.$sys = {
	config: {
		static: "__STATIC__",
		css: "__CSS__",
		image: "__IMG__",
		js: "__JS__",
		app: "{$Request.baseFile}",
		module: "{$Request.module}",
		controller: "{$Request.controller}",
		action: "{$Request.action}",
		bindModule: "{:\\think\\facade\\Route::getBind()}",
		urlDeep: "{$Think.config.pathinfo_depr}", //PATHINFO分割符
		urlModel: ["{$Think.config.url_convert}", "{$Think.config.url_html_suffix}"]
	}
};
window.jQuery = window.$ = layui.$;

layui.use(['carousel', 'form'], function() {
	var carousel = layui.carousel;

	//常规轮播
	$('.layui-carousel').each(function() {
		var options = $(this).data('carousel') || {};
		if (typeof options === 'string') {
			try {
				options = eval('(' + options + ')');
			} catch (e) {
				console.warn('carousel', e);
			}
		}
		options = Object.assign({
			elem: this,
			arrow: 'always',
			width: 'auto',
		}, options);
		carousel.render(options);
	});

	(function() {
		const subCateContainer= $('#sub_cate_container');
		$('.fly-header .fly-nav').on('mouseenter', '.layui-nav-item', function() {
			const self = $(this), id = self.data('id');

			if (self.hasClass('show-sub-cate')) {
				if (subCateContainer.is(':hidden')){
					subCateContainer.fadeIn();
				}

				$('#sub_cate_container ul.layui-clear').hide();
				$('#sub_cate_' + id).fadeIn();
			}else {
				subCateContainer.fadeOut();
			}
		});

		subCateContainer.mouseleave(function() {
			subCateContainer.fadeOut();
		});
	})();
});


</script>
{block name="importJs"}{/block}
<script type="text/javascript">{block name="scriptVar"}{/block}</script>
{block name="foot"}{/block}
</html>
